-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not duplicate reported warnings/errors #3050
Conversation
As near as I can tell, the decrease in code coverage is due to the fact that |
function addInternalSrc(elem, src) { | ||
var i; | ||
i = { | ||
function addInternalSrc(elem, token) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're refactoring, it makes sense to rename this more appropriate, perhaps: addEvalCode
. https://tc39.github.io/ecma262/#sec-types-of-source-code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me!
* @param {object} options - linting options to apply | ||
* @param {object} globals - globally-defined bindings for the evaluated code | ||
*/ | ||
function lintEvaled(internals, options, globals) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe lintEvalCode()
? To match the earlier suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect
@@ -126,7 +132,8 @@ exports.setup.testRun = function (test, name) { | |||
|
|||
test.ok( | |||
undefinedErrors.length === 0 | |||
&& unthrownErrors.length === 0 && wrongLineNumbers.length === 0, | |||
&& unthrownErrors.length === 0 && wrongLineNumbers.length === 0 | |||
&& duplicateErrors.length === 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick ctrl-f of this file shows that this is the only place where the logical operator is at the beginning of the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch--updated
Awaiting green light from CI |
When a "rest" operator is not followed by the identifier, report the value of the unexpected token (not the "rest" operator itself).
Extend the testing infrastructure to recognize cases where identical warnings/errors are being reported, and address the areas of the code base that previously suffered from this problem.
The name `addEvalCode` more directly relates to relevant language in the ECMA262 specification.
b60b99e
to
6707c54
Compare
Squashed intermediary commits in preparation for merge to |
Nice work! |
The final commit is where it's at. The first two (along with #3049 before them) address more minor bugs in service of that change.